package com.xyf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xyf.mapper.CarMapper;
import com.xyf.pojo.entity.TbCar;
import com.xyf.pojo.entity.TbMaintainShop;
import com.xyf.service.CarService;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @program: clms-seventh
 * @description:
 * @author: 徐亚飞
 * @create: 2021-07-24 16:06
 **/
@Service
@ApiModel(value = "汽车信息" , description = "汽车信息")
public class CarServiceImpl implements CarService {

    @Resource
    CarMapper mapper;

    @Override
    @ApiModelProperty("查询所有汽车名")
    public List<TbCar> findAllCars() {
        QueryWrapper<TbCar> wrapper=new QueryWrapper<>();
        wrapper.groupBy("carName");
        List<TbCar> tbCars = mapper.selectList(wrapper);
        return tbCars;

    }
}
